<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/page/share/taglib.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>友情链接管理界面</title>
    
     <script type="text/javascript">
    	//到指定的分页页面
		function topage(page){
			var form = document.forms[0];
			form.page.value=page;
			form.submit();
		}
		function deleteflink(id){
			if(confirm("确认要删除？")){
				var form = document.forms[0];
				form.action = "/control/flink/delete?flink.id=" + id;
				form.submit();
			}

		}
	</script>
  </head>
  
  <body>
  	 <form action="/control/flink/index" method="post">
  	 	<input type="hidden" name="page" value="1">
   		<table width="100%" align="center">
   		    <tr><td><a href="/control/flink/add">添加友情链接</a> </td></tr>
   			<tr>
   			  <th>编号</th>
   			  <th>站点名称</th>
   			  <th>站点url</th>
   			  <th>排序id</th>
   			  <th width="10%">操作</th>
   			</tr>
   			
   			<c:forEach items="${pageView.records}" var="entry">
   			<tr align="center">
   			  
   			  <td>${entry.id }</td>
   			  <td>${entry.name }</td>
   			  <td>${entry.url }</td>
   			  <td>${entry.sort }</td>
   			  <td>
   			  <a href="/control/flink/edit?flink.id=${entry.id }">修改</a> 
   			  <a href="javascript:void(0);" onclick="deleteflink('${entry.id}')">删除</a> 
   			  </td>
   			</tr>
   			</c:forEach>
   			<tr>
   				<td colspan="9">
   					<%@ include file="/WEB-INF/page/share/fenye.jsp" %>
   				</td>
   			</tr>
   		</table>
   	 </form>
  </body>
</html>